package com.jsu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.model.activity.pojo.Registration;

import java.util.List;

@Mapper
public interface RegistrationMapper extends BaseMapper<Registration> {
    @Select("SELECT  COUNT(registration_channel) AS channel_count\n" +
            "FROM registration\n" +
            "GROUP BY registration_channel;")
    List<Integer> countRegistrations();

    @Select("SELECT COUNT(*) FROM registration;")
    Integer count();
}